package com.baoke;

import com.baoke.service.UserService;
import com.spring.BaokeApplicationContext;

/**
 * @author 暴珂
 * @version 1.0
 * @description
 * @date 2024/6/4 11:38:32
 */
public class Test {

    public static void main(String[] args) {
        BaokeApplicationContext context = new BaokeApplicationContext(AppConfig.class);
        UserService userService = (UserService) context.getBean("userService"); // map <beanName, bean对象> 单例池
        Object userService2 = context.getBean("userService");
        Object userService3 = context.getBean("userService");
        System.out.println(userService);
        System.out.println(userService2);
        System.out.println(userService3);
        userService.test();
        //视频看到aop了-
    }
}
